import AppMain from './AppMain/index.vue';
import Avatar from './Avatar/index.vue';
import Breadcrumb from './Breadcrumb/index.vue';
import Horizontal from './Horizontal/index.vue';
import Logo from './Logo/index.vue';
import MenuItem from './Menu/MenuItem.vue';
import Menu from './Menu/index.vue';
import Mobile from './Mobile/index.vue';
import RightPanel from './NavBar/RightPanel.vue';
import NavBar from './NavBar/index.vue';
import TabBar from './TabBar/index.vue';
import ThemeSetting from './ThemeSetting/index.vue';

// 组件列表
const components = [
  AppMain,
  Avatar,
  Breadcrumb,
  Horizontal,
  Logo,
  MenuItem,
  Menu,
  Mobile,
  RightPanel,
  NavBar,
  TabBar,
  ThemeSetting
];

// 注册组件
export default (app) => {
  components.forEach((component) => {
    const componentName = component.name || component.__name || component.__file.split('/').pop().split('.')[0];
    app.component(componentName, component);
  });
};